package cn.monkey.io.transport.core;

public interface ExchangeFactory<C, EXCHANGE extends Exchange> {

    /**
     * @param key      {@link EXCHANGE#id()}
     * @param exchange oldExchange 可能为null
     * @param c        其他参数
     * @return Exchange
     */
    EXCHANGE apply(String key,
                   Exchange exchange,
                   C c);
}
